Optimal. Leaf size=245 \[ \frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}-\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-\sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.49, antiderivative size = 245, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3211, 3181, 203} \[ \frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {a \sqrt [4]{b}+(-a)^{5/4}} \cot (x)}{(-a)^{5/8}}\right )}{4 (-a)^{3/8} \sqrt {a \sqrt [4]{b}+(-a)^{5/4}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3181
Rule 3211
Rubi steps
\begin {align*} \int \frac {1}{a+b \cos ^8(x)} \, dx &=\frac {\int \frac {1}{1-\frac {\sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1-\frac {i \sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1+\frac {i \sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}+\frac {\int \frac {1}{1+\frac {\sqrt [4]{b} \cos ^2(x)}{\sqrt [4]{-a}}} \, dx}{4 a}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{1+\left (1-\frac {\sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}-\frac {\operatorname {Subst}\left (\int \frac {1}{1+\left (1-\frac {i \sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}-\frac {\operatorname {Subst}\left (\int \frac {1}{1+\left (1+\frac {i \sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}-\frac {\operatorname {Subst}\left (\int \frac {1}{1+\left (1+\frac {\sqrt [4]{b}}{\sqrt [4]{-a}}\right ) x^2} \, dx,x,\cot (x)\right )}{4 a}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}-i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+i \sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {\sqrt [4]{-a}+\sqrt [4]{b}} \cot (x)}{\sqrt [8]{-a}}\right )}{4 (-a)^{7/8} \sqrt {\sqrt [4]{-a}+\sqrt [4]{b}}}+\frac {\tan ^{-1}\left (\frac {\sqrt {(-a)^{5/4}+a \sqrt [4]{b}} \cot (x)}{(-a)^{5/8}}\right )}{4 (-a)^{3/8} \sqrt {(-a)^{5/4}+a \sqrt [4]{b}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.27, size = 172, normalized size = 0.70 \[ 8 \text {RootSum}\left [\text {$\#$1}^8 b+8 \text {$\#$1}^7 b+28 \text {$\#$1}^6 b+56 \text {$\#$1}^5 b+256 \text {$\#$1}^4 a+70 \text {$\#$1}^4 b+56 \text {$\#$1}^3 b+28 \text {$\#$1}^2 b+8 \text {$\#$1} b+b\& ,\frac {2 \text {$\#$1}^3 \tan ^{-1}\left (\frac {\sin (2 x)}{\cos (2 x)-\text {$\#$1}}\right )-i \text {$\#$1}^3 \log \left (\text {$\#$1}^2-2 \text {$\#$1} \cos (2 x)+1\right )}{\text {$\#$1}^7 b+7 \text {$\#$1}^6 b+21 \text {$\#$1}^5 b+35 \text {$\#$1}^4 b+128 \text {$\#$1}^3 a+35 \text {$\#$1}^3 b+21 \text {$\#$1}^2 b+7 \text {$\#$1} b+b}\& \right ] \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{b \cos \relax (x)^{8} + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.22, size = 76, normalized size = 0.31 \[ \frac {\munderset {\textit {\_R} =\RootOf \left (a \,\textit {\_Z}^{8}+4 a \,\textit {\_Z}^{6}+6 a \,\textit {\_Z}^{4}+4 a \,\textit {\_Z}^{2}+a +b \right )}{\sum }\frac {\left (\textit {\_R}^{6}+3 \textit {\_R}^{4}+3 \textit {\_R}^{2}+1\right ) \ln \left (\tan \relax (x )-\textit {\_R} \right )}{\textit {\_R}^{7}+3 \textit {\_R}^{5}+3 \textit {\_R}^{3}+\textit {\_R}}}{8 a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{b \cos \relax (x)^{8} + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.42, size = 216, normalized size = 0.88 \[ \sum _{k=1}^8\ln \left ({\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right )}^4\,a^5\,b^5\,\left ({\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right )}^2\,a^2\,64+1\right )\,\left (\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right )\,a\,\mathrm {tan}\relax (x)\,8-1\right )\,4096\right )\,\mathrm {root}\left (16777216\,a^7\,b\,d^8+16777216\,a^8\,d^8+1048576\,a^6\,d^6+24576\,a^4\,d^4+256\,a^2\,d^2+1,d,k\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{a + b \cos ^{8}{\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________